using System;

namespace Mediator.Framework.Runtime.Communication
{
    public interface IListnerProcessor:IDisposable
    {
        /// <summary>
        /// Accepts incomming connection.
        /// Returned IMessageProcessor will be usen after Accept.
        /// Null result will decline connection.
        /// </summary>
        /// <param name="connection"></param>
        /// <returns></returns>
        IMessageProcessor Accept(IConnection connection);
    }
}